<div class="container">
  <div class="row">

    <div class="col s12 m9 l10">

      <div id="introduction" class="section scrollspy">
        <h4>Introduction</h4>
        <p>The tabs structure consists of an unordered list of tabs that have hashes corresponding to tab ids. Then when you click on each tab, only the container with the corresponding tab id will become visible. You can add the class <code class="language-markup">.disabled</code> to make a tab inaccessible. </p>

        <ul class="tabs tab-demo z-depth-1">
          <li class="tab col s3"><a href="#test1">Test 1</a></li>
          <li class="tab col s3"><a class="active" href="#test2">Test 2</a></li>
          <li class="tab col s3 disabled"><a href="#test3">Disabled Tab</a></li>
          <li class="tab col s3"><a href="#test4">Test 4</a></li>
        </ul>
        <div id="test1" class="col s12"><p>Test 1</p></div>
        <div id="test2" class="col s12"><p>Test 2</p></div>
        <div id="test3" class="col s12"><p>Test 3</p></div>
        <div id="test4" class="col s12"><p>Test 4</p></div>
        <br>
      </div>


      <div id="structure" class="section scrollspy">
        <h4>Tabs HTML Structure</h4>
        <pre><code class="language-markup">
  &lt;div class="row">
    &lt;div class="col s12">
      &lt;ul class="tabs">
        &lt;li class="tab col s3">&lt;a href="#test1">Test 1&lt;/a>&lt;/li>
        &lt;li class="tab col s3">&lt;a class="active" href="#test2">Test 2&lt;/a>&lt;/li>
        &lt;li class="tab col s3 disabled">&lt;a href="#test3">Disabled Tab&lt;/a>&lt;/li>
        &lt;li class="tab col s3">&lt;a href="#test4">Test 4&lt;/a>&lt;/li>
      &lt;/ul>
    &lt;/div>
    &lt;div id="test1" class="col s12">Test 1&lt;/div>
    &lt;div id="test2" class="col s12">Test 2&lt;/div>
    &lt;div id="test3" class="col s12">Test 3&lt;/div>
    &lt;div id="test4" class="col s12">Test 4&lt;/div>
  &lt;/div>
        </code></pre>
      </div>



      <div id="initialization" class="section scrollspy">
        <h4>jQuery Plugin Initialization</h4>
        <p>Tabs are initialized automatically, but if you add tabs dynamically you will have to initialize them like this.</p>
        <pre><code class="language-javascript">
  $(document).ready(function(){
    $('ul.tabs').tabs();
  });
        </code></pre>
      </div>

      <div id="method" class="section scrollspy">
        <h4>jQuery Plugin Methods</h4>
        <p>You can programmatically trigger a tab change with our <code class="language-javascript">select_tab</code> method. You have to input the id of the tab you want to switch to. In the case of our demo it would be either test1, test2, test3, or test4.</p>
        <pre><code class="language-javascript">
  $(document).ready(function(){
    $('ul.tabs').tabs('select_tab', 'tab_id');
  });
        </code></pre>
      </div>



      <div id="preselecting" class="section scrollspy">
        <h4>Preselecting a tab</h4>
          <p>By default, the first tab is selected. But if this is not what you want, you can preselect a tab by either passing in the hash in the url ex:<code class="language-markup">#test2</code>. Or you can add the class <code class="language-markup">active</code> to the <code class="language-markup">a</code> tag.</p>
        <pre><code class="language-markup col s12">
  &lt;li class="tab col s2">&lt;a class="active" href="#test3">Test 3&lt;/a>&lt;/li>
        </code></pre>
      </div>

    </div>

    <!-- Table of Contents -->
    <div class="col hide-on-small-only m3 l2">
      <div class="toc-wrapper">
        <div class="buysellads hide-on-small-only">
          <!-- CarbonAds Zone Code -->
          <script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=materializecss" id="_carbonads_js"></script>
        </div>
        <div style="height: 1px;">
          <ul class="section table-of-contents">
            <li><a href="#introduction">Introduction</a></li>
            <li><a href="#structure">Structure</a></li>
            <li><a href="#initialization">Intialization</a></li>
            <li><a href="#method">Methods</a></li>
            <li><a href="#preselecting">Preselecting</a></li>
          </ul>
        </div>
      </div>
    </div>

  </div>
</div>

